package com;

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class ElementTest {
	
	public static void main(String[] args) {
		 
		long a = System.currentTimeMillis();
		
		//https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=%E5%B7%A5%E5%85%B7&oq=%E5%B7%A5%E5%85%B7&rsv_pq=d6a88424000051e0&rsv_t=e98fNPkouip35Tv5yk3Ou7BntZI4KAIgsWJpEe8vtweepdPysUxv9Rg2D9U&rqlang=cn&rsv_enter=0&rsv_sug=1
		
		try {
			Document doc = Jsoup.connect("http://m.haokongbu.com/guochanju/91290.html").get();
			
			Elements links = doc.select("a[href~=thunder|0-0]"); 
			
			for (Element element : links) {
				System.out.println(element.attr("href"));
			}
			 
			
			
			//System.out.println(doc);
			System.out.println(System.currentTimeMillis() - a);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
}
